package domain;

public class Seed {
	private int seedID;
	private String seed;
	private SeedStatus status;
	private String error;
	private int depth;
	
	public Seed(String seed, Seed parent) {
		this(0, seed, SeedStatus.Pending, (parent != null ? parent.getDepth() + 1 : 1));
	}
	
	public Seed(int seedID, String seed, SeedStatus status, int depth) {
		this.seedID = seedID;
		seed = seed.toLowerCase()
				.trim()
				.replaceAll("\\s+", " ");
		
		this.seed = seed;
		this.status = status;
		this.depth = depth;
	}	
	public int getSeedID() { return this.seedID; }
	public String getSeed() { return this.seed; }
	public SeedStatus getStatus() { return this.status; }
	public void setStatus(SeedStatus value) { this.status = value; }
	public int getDepth() { return this.depth; }
	
	public String getError() { return this.error; }
	public void setError(String value) { this.error = value; }
}
